<template>
    <Page>
        <Panel title="店铺信息" class="">
            <el-row :gutter="20">
                <el-col :span="6">
                    <img :src="info.storePic" width="250" height="168" style="margin-top:20px;" />
                </el-col>
                <el-col :span="18">
                    <el-form ref="form" label-width="140px">
                        <el-form-item label="店铺名称">{{info.storeName}}</el-form-item>
                        <el-form-item label="店铺地址">{{info.storeAddress}}</el-form-item>
                        <el-form-item label="店铺电话">{{info.storePhone}}</el-form-item>
                        <el-form-item label="营业时间">{{info.storeHours}}</el-form-item>
                        <el-form-item label="经营商品种类">{{info.storeGoods}}</el-form-item>
                    </el-form>
                </el-col>
            </el-row>
        </Panel>
        <Panel title="企业信息">
            <el-form ref="form" label-width="140px">
                <el-form-item label="公司名称">{{info.mchName}}</el-form-item>
                <el-form-item label="所在地区">{{info.mchAreaName}}</el-form-item>
                <el-form-item label="详细地址">{{info.mchAddress}}</el-form-item>
                <el-form-item label="法人姓名">{{info.legalPerson}}</el-form-item>
                <el-form-item label="法定代表身份证号">{{info.idCardNo}}</el-form-item>
                <el-form-item label="法定代表身份证照片">
                    <el-row>
                        <el-col :span="10">
                            <img :src="info.idCardBack" width="400" height="250" />
                        </el-col>
                        <el-col :span="10">
                            <img :src="info.idCardFront" width="400" height="250" />
                        </el-col>
                    </el-row>
                </el-form-item>
                <el-form-item label="统一社会信用代码">{{info.licenseNo}}</el-form-item>
                <el-form-item label="营业执照照片">
                    <img :src="info.licensePic" width="400" height="250" />
                </el-form-item>
            </el-form>
        </Panel>
        <Panel title="银行信息">
            <el-form ref="form" label-width="140px">
                <el-form-item label="银行开户人姓名">{{info.bankAccountName}}</el-form-item>
                <el-form-item label="银行账户">{{info.bankAccountNo}}</el-form-item>
                <el-form-item label="开户银行" v-if="info.mchType == 11">{{info.openingBank}}</el-form-item>
                <el-form-item label="开户许可证" v-if="info.mchType == 12">
                    <img :src="info.openingLicense" width="400" height="250" />
                </el-form-item>
            </el-form>
        </Panel>
    </Page>
</template>

<script>
import Panel from "@/components/panel/Panel";
import Page from "@/components/page/Page";
export default {
    data(){
        return {
            params:{
                mchNo:null,
            },
            info:{
                applyName: "",
                bankAccountName: "",
                bankAccountNo: "",
                bankChannelNo: "",
                idCardBack: "",
                idCardFront: "",
                idCardNo: "",
                legalPerson: "",
                licenseNo: "",
                licensePic: "",
                mchAccount: "",
                mchAddress: "",
                mchAreaName: "",
                mchName: "",
                mchNo: "",
                mchRate: "",
                mchStatus: 0,
                mchType: 0,
                openingBank: "",
                openingLicense: "",
                platRate: "0",
                storeAddress: "",
                storeGoods: "",
                storeHours: "",
                storeId: 0,
                storeName: "",
                storePhone: "",
                storePic: "",
            },
        }
    },
    created() {
        this.params.mchNo = this.$route.query.mchNo;
    },
    mounted() {
        this.initData();
    },
    methods:{
        initData(){
            // 初始化数据
            this.$http.get('/api/altmch/detail', {params:this.params}).then(result => {
                if(result.code == 200){
                    this.info = result.data;
                }else{
                    this.$message.error(result.msg);
                }
            });
        },
    },
    components:{
        Page,
        Panel
    }
}
</script>

<style lang="less" scoped>
.gloabl-page{
    ::v-deep(.page-main){
        .panel{
            .panel-body{
                .el-form-item{
                    margin-bottom:0px;
                }
            }
        }
    }
}
</style>
